import { getData, postData } from "@/utils/request";

/**
 * 获取公告列表
 * @param {*} data 
 */
export const getAnnouncementLists = async (data) => {
    const res = await postData('/sysUserAnnouncement/getAnnouncementById', data);
    return res;
};

/**
 * 获取公告详情
 * @param {*} id 
 */
export const getAnnouncementDetail = async (id) => {
    const res = await getData(`/sysUserAnnouncement/getAnnouncementDetail/${id}`);
    return res;
};

/**
 * 获取消息列表
 * @param {*} data 
 */
export const getMessageLists = async (data) => {
    const res = await postData('/messageNotification/getMsgList', data);
    return res;
};

/**
 * 获取消息列表详情
 * @param {*} id 
 */
export const getMessageDetail = async (id) => {
    const res = await getData(`/messageNotification/getMsgDetail/${id}`);
    return res;
};